package com.zzuli.yxy.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.*;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.poi.ss.usermodel.FillPatternType;

import java.util.List;

/**
 * @auther pony
 * @create 2023-03-05 14:36
 * 职工表
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ContentRowHeight(20) //设置内容高度
@HeadRowHeight(20) //设置标题高度
@ColumnWidth(10) //列宽
//标题背景色设为绿色 42
@HeadStyle(fillPatternType = FillPatternType.SOLID_FOREGROUND, fillForegroundColor = 42)
//标题字体
@HeadFontStyle(fontHeightInPoints = 10)
public class Employee {
    @ColumnWidth(5) //列宽
    @ExcelProperty("序号")
    private Integer id; //职工id
    @ExcelProperty("职工账号")
    private String username; //职工账号
    @ExcelProperty("职工密码")
    private String password; //职工密码
    //角色权限列表 不映射数据库
    @TableField(exist = false)
    @ColumnWidth(40) //列宽
    @ExcelProperty("职工角色")
    private List<String> roleName; //角色名字
    @ExcelProperty("职工状态")
    private Integer status; //职工状态
    @ColumnWidth(20) //列宽
    @ExcelProperty("职工电话")
    private String phone; //职工电话
    @ColumnWidth(20) //列宽
    @ExcelProperty("职工电子邮件")
    private String email; //职工联系地址
    @ColumnWidth(20) //列宽
    @ExcelProperty("职工联系地址")
    private String address; //职工联系地址
    @ColumnWidth(40) //列宽
    @ExcelProperty("职工头像路径")
    private String image; //职工头像路径
    @ColumnWidth(40) //列宽
    @ExcelProperty("职工备注信息")
    private String remarks; //职工备注信息
//    private Date create_time; //创建时间
//    private Date update_time; //跟新时间
}
